package com.ruoyi.material.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.material.domain.SysUserMaterial;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

/**
 * 资料评分Mapper接口
 * 
 * @author hsx
 * @date 2022-01-09
 */
public interface SysUserMaterialMapper extends BaseMapper<SysUserMaterial>
{
    /**
     * 查询资料评分
     * @param userId
     * @param materialId
     * @return
     */
    public SysUserMaterial selectSysUserMaterialById(@Param("userId") Long userId,@Param("materialId") Long materialId);

    /**
     * 查询资料评分列表
     * 
     * @param sysUserMaterial 资料评分
     * @return 资料评分集合
     */
    public List<SysUserMaterial> selectSysUserMaterialList(SysUserMaterial sysUserMaterial);

    /**
     * 新增资料评分
     * @param list
     * @param materialId
     * @return
     */
    public int insertSysUserMaterial(@Param("list") List<Long> list,@Param("materialId") Long materialId);

    /**
     * 修改资料评分
     * 
     * @param sysUserMaterial 资料评分
     * @return 结果
     */
    public int updateSysUserMaterial(SysUserMaterial sysUserMaterial);

    /**
     * 获取roleKey角色的所有用户
     * @param roleKey
     * @return
     */
    public List<Long> expertList(@Param("roleKey") String roleKey);



}
